package com.td.module.pests.convert.library;

import com.td.framework.common.pojo.PageResult;
import com.td.module.pests.controller.admin.library.vo.LibraryCreateReqVO;
import com.td.module.pests.controller.admin.library.vo.LibraryExcelVO;
import com.td.module.pests.controller.admin.library.vo.LibraryRespVO;
import com.td.module.pests.controller.admin.library.vo.LibraryUpdateReqVO;
import com.td.module.pests.dal.dataobject.library.LibraryDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 病虫害知识库 Convert
 *
 * @author wangxx
 */
@Mapper
public interface LibraryConvert {

    LibraryConvert INSTANCE = Mappers.getMapper(LibraryConvert.class);

    LibraryDO convert(LibraryCreateReqVO bean);

    LibraryDO convert(LibraryUpdateReqVO bean);

    LibraryRespVO convert(LibraryDO bean);

    List<LibraryRespVO> convertList(List<LibraryDO> list);

    PageResult<LibraryRespVO> convertPage(PageResult<LibraryDO> page);

    List<LibraryExcelVO> convertList02(List<LibraryDO> list);

}
